@page "/serverTime"
@inherits LiveComponentBase<ServerTimeState>

@{
    var lastUpdateError = LiveState.LastUpdateError; 
}

<h1>Server Time</h1>

<p>Server Time: @(State.Time.Format())</p>

@if (lastUpdateError != null) {
    <div class="alert alert-warning" role="alert">
        Update error: @lastUpdateError.Message
    </div>
}

<button class="btn btn-primary" @onclick="() => Invalidate()">Refresh</button>
